const express = require('express');
const app = new express();  //new可以省略
//引入路由模块
const userRouter = require('./routes/users');
//配置post发送文本数据
app.use(express.urlencoded({
    extended: false
}))
app.use(express.json());

//设置一级路由
app.use('/user', userRouter)
//监听端口
app.listen(3000, () => {
    console.log('3000running');
})